<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:mshelp="http://msdn.microsoft.com/mshelp" dir="LTR">

<head>
<title>Shape Sample (simple)(VML)</title>

<!-- Libraries needed for Specs -->
<script type="text/javascript" src="squigle.js"></script>
<script type="text/javascript" src="svgAdapter.js"></script>
<script type="text/javascript" src="vmlAdapter.js"></script>


<script>
//Use the correct adaptor for the browser
var isMsie = /msie/.test( navigator.userAgent.toLowerCase() ) && !/opera/.test( navigator.userAgent.toLowerCase() );
if(isMsie){
    squigle.setAdapter(squigle.vmlAdapter);
} else {
    squigle.setAdapter(squigle.svgAdapter);
}

function init(){
        var canvas = new squigle.Canvas(new squigle.Size(200,200));
        var rectangle = new squigle.Rectangle(
            new squigle.Size(180,180),
            new squigle.Point(10,10),
            new squigle.Stroke("#FF0000"),
            new squigle.Fill("#FF0000")
        );

        canvas.append(rectangle);
        rectangle.node().onclick = function(){
            rectangle.node().style.left = "100px";
        }
    document.body.appendChild(canvas.node());    
}

</script>

</head>
<body onload="init()">
</body>

</html>

